﻿namespace Storyteller.Framework.Graphics.Particles.Modifiers
{
	public class RotationModifier : ParticleModifier
	{
		public float RotationSpeed { get; set; }

		public override void Process(float deltaSeconds, Particle[] particles, int count)
		{
			float deltaRotation = RotationSpeed * deltaSeconds;

			for (int i = 0; i < count; i++)
			{
				if(particles[i].Rotation > 0)
					particles[i].Rotation += deltaRotation;
				else
					particles[i].Rotation -= deltaRotation;
			}
		}
	}
}
